//
//  RushCvCell.m
//  K-Music
//
//  Created by 林杰良 on 16/1/1.
//  Copyright © 2016年 CHUN. All rights reserved.
//

#import "RushCvCell.h"

@implementation RushCvCell

-(id)initWithFrame:(CGRect)frame{
    
    self=[super initWithFrame:frame];
    
    if (self) {
        
        //底头像
        _icon_image = [[UIImageView alloc]initWithFrame:CGRectMake(1, 1, WIDTH/2-2, HEIGHT/4-1)];
        
        UIImage *image = [UIImage imageNamed:@"组-3"];
        
        image = [image imageByCroppingWithStyle:1];
        
        _icon_image.image = image;
        
        [self addSubview:_icon_image];
        
        //排序
        _list_num_label=[[UILabel alloc]initWithFrame:CGRectMake(0,HEIGHT/6-10, 30, 30)];
        _list_num_label.text= @"1";
//        _list_num_label.backgroundColor = [UIColor orangeColor];
        _list_num_label.font = [UIFont systemFontOfSize:18];
        _list_num_label.textColor=[UIColor whiteColor];
        _list_num_label.textAlignment=NSTextAlignmentCenter;
        [_icon_image addSubview: _list_num_label];

        //歌曲名
        _song_name=[[UILabel alloc]initWithFrame:CGRectMake(10, CGRectGetMaxY(_list_num_label.frame), WIDTH/2-10, 30)];
        _song_name.text=@"Do you know";
        _song_name.font = [UIFont systemFontOfSize:18];
        _song_name.textColor=[UIColor whiteColor];
        _song_name.textAlignment= NSTextAlignmentLeft;
        [_icon_image addSubview: _song_name];
        
        //昵称 + VIP + 财富等级 + 歌手等级
        _user_name=[[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(_list_num_label.frame),HEIGHT/6-10,WIDTH/2-30, 30)];
        _user_name.text=@"黑神";
//        _user_name.backgroundColor = [UIColor redColor];
        _user_name.textColor=[UIColor whiteColor];
        _user_name.font = [UIFont systemFontOfSize:18];
        _user_name.textAlignment=NSTextAlignmentLeft;
        [_icon_image addSubview: _user_name];

        _top_img=[[UIImageView alloc]initWithFrame:CGRectMake(CGRectGetMaxX(_list_num_label.frame), 10, 35, 30)];
        _top_img.image=[UIImage imageNamed:@"图层-49"];
        //        [_icon_image addSubview:_top_img];
        
        _my_fun=[[UILabel alloc]initWithFrame:CGRectMake(WIDTH/4, _icon_image.frame.size.height-30, WIDTH/4, 30)];
        _my_fun.text = @"1234人";
        _my_fun.font = [UIFont systemFontOfSize:13];
        _my_fun.textColor=[UIColor whiteColor];
        _my_fun.textAlignment=NSTextAlignmentCenter;
        //        [_icon_image addSubview: _my_fun];
        
        _VIP =[[UIImageView alloc]initWithFrame:CGRectMake(CGRectGetMaxX(_user_name.frame), HEIGHT/6+10,20,10)];
        _VIP.image = [UIImage imageNamed:@"vip_one"];
        //        [_icon_image addSubview:_VIP];
        
        _star_one =[[UIImageView alloc]initWithFrame:CGRectMake(CGRectGetMaxX(_VIP.frame), HEIGHT/6+5,25,20)];
        _star_one.image = [UIImage imageNamed:@"star_one"];
        //        [_icon_image addSubview:_star_one];
        
        _star_two =[[UIImageView alloc]initWithFrame:CGRectMake(CGRectGetMaxX(_star_one.frame), HEIGHT/6+5,25,20)];
        _star_two.image = [UIImage imageNamed:@"star_two"];
        //        [_icon_image addSubview:_star_two];
        
    }
    return self;
}
@end
